package com.wanghua.spring.listeners.singleton;

import java.io.Serializable;
import java.util.Date;

public class PersonInfo implements Serializable {

    private static final long serialVersionUID = 4063725584941336123L;

    private String account;
    private String ip;
    private Date loginDate;
    private String pwd;

    public PersonInfo(String account,String pwd,Date loginDate) {
        this.account = account;
        this.pwd = pwd;
        this.loginDate = loginDate;
    }

    public String getAccount() {
        return account;
    }


    public void setAccount(String account) {
        this.account = account;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || !(obj instanceof PersonInfo)) {
            return false;
        }
        return account.equalsIgnoreCase(((PersonInfo) obj).getAccount());
    }
}

